package com.ellwood.IPGuard.common.core.basic;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @ProjectName: IPGuard-boot
 * @PackageName: com.ellwood.IPGuard.common.core.basic
 * @ClassName: EntityFactory
 * @Description: // Entity基类工厂
 * @Author: Ellwood
 * @CreateDate: 2024/9/25 - 下午3:47
 * @Version: V1.0.0
 */
@Data
public class EntityFactory implements TransPojo {

    /**
     * 状态（0正常 1停用）
     */
    @Schema(description = "状态（0正常 1停用）")
    @TableField(fill = FieldFill.INSERT,select = false)
    private Integer status;

    /**
     * 创建者
     */
    @Schema(description = "创建者")
    @TableField(fill = FieldFill.INSERT)
    private Long creator;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新者
     */
    @Schema(description = "更新者")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updater;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     *   MybatisPlus默认是：0:未删除,1:删除
     */
    @Schema(description = "逻辑删除(0:未删除,1:删除)")
    @TableLogic //表示是逻辑删除
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    // todo 后续会将公共的东西提取到这里，暂时无内容

}
